package ft.esc.util;

import java.io.File;

import java.util.Map;
import java.util.HashMap;

import ft.esc.impl.C;

public class UFM
{
	public static Map<String,String> getFileInfoMapByPath(String filePath)
	{
		Map<String,String> m = null;
		
		if(filePath!=null && filePath.length()>0)
		{
			
			File f = new File(filePath);
			if(f != null && f.exists() && f.isFile() && f.canRead())
			{
				m = new HashMap<String,String>();
				long len = f.length();
				m.put(C.AL_CTX_NAME, filePath);
				m.put(C.AL_CTX_LENGTH, Long.toString(len));
				
			}
		}
		
		return m;
	}

}
